-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Standalone nodes to operate in an orchestrated environment #138
base: master
Are you sure you want to change the base?
Conversation
Slight error on watching
|
Seems to be fully functional now, but would appreciate feedback on a better way of handling the switch between interacting with the EdgeNodeServiceConnection (if using a relayed stream) vs XServiceConnection (if streaming directly to the Standalone node). |
@@ -749,17 +770,20 @@ janus_plugin_result* JanusFtl::handleWatchMessage(ActiveSession& session, JsonPt | |||
|
|||
// If we're an Edge node and this is a first viewer for a given channel, | |||
// request that this channel be relayed to us. | |||
if ((configuration->GetNodeKind() == NodeKind::Edge) && (pendingViewers == 0)) | |||
if (orchestrationEnabled && (pendingViewers == 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking through a potential ambiguity in this codepath -
Consider a scenario where a standalone FTL instance receives a watch request for a channel that has not started streaming yet. The standalone FTL server will subscribe to the channel via orchestrator.
Afterwards, the streamer actually begins streaming, but connects to the same standalone FTL server.
I suspect the orchestrator will fulfill the standalone FTL server's subscription and notify the server to relay the stream to itself.
Since only one stream can exist per channel, the standalone server will probably terminate the stream (or maybe worse, haven't really traced it through all the way).
We'll probably need special behavior to either
1.) Enlighten the orchestrator so it can handle when a standalone server tries to publish a stream on the same channel that it previously has subscribed to
2.) Enlighten the standalone FTL server so it can handle "transitioning" between a pending orchestrator relay and a "direct" stream
Thoughts?
Getting back to this now, if I remember correctly there's a single remaining bug:
Will need to think on this tomorrow. |
Essentially what this allows for is a node to act within an orchestrator network as both an ingest & edge. Serving up video directly from itself, and proxying it from other nodes as required. Working on one server as a proof of concept, but would appreciate a logic review!
Currently a test server is available at:
do-nyc3-combo1.kjfk.live.glimesh.tv
. You can easily stream to it and watch on Glimesh.tv and test edge functionality by using https://glimesh.github.io/janus-ftl-player/ and your favorite channel_id.Checklist
combo1
stream fromedge1
while configured asstandalone
combo1
stream fromcombo1
while configured asstandalone
ingest1
stream fromcombo1
while configured asstandalone